package javase.io;

import java.io.File;
import java.io.IOException;

/**
 * File常用方法
 * @author LiShaowen
 * @date 2020/9/7 21:57
 */
public class FileTest02 {

    public static void main(String[] args) throws IOException {
        File file = new File("E:/IDEAProject/java/src/main/java/javase/LIshaowen.jpg");
        System.out.println("名称"+file.getName());
        System.out.println("路径"+file.getPath());
        System.out.println("绝对路径"+file.getAbsolutePath());
        System.out.println("父路径"+file.getParent());
        System.out.println("--"+file.isFile());
        System.out.println("--"+file.exists());
        System.out.println("--"+file.isDirectory());
        System.out.println("--"+file.getCanonicalPath());
    }
}
